
import 'package:jyofservice/bean/diao_du_list_entity.dart';
import 'package:jyofservice/bean/user_info_entity.dart';
import 'package:jyofservice/bean/work_condition_entity.dart';
import 'package:jyofservice/bean/work_log_list_entity.dart';

class EntityFactory {
  static T? generateOBJ<T>(json) {
    if (1 == 0) {
      return null;
    }  else if (T.toString() == "UserInfoEntity") {
      return UserInfoEntity.fromJson(json) as T;
    } else if (T.toString() == "WorkConditionEntity") {
      return WorkConditionEntity.fromJson(json) as T;
    } else if (T.toString() == "WorkLogListEntity") {
      return WorkLogListEntity.fromJson(json) as T;
    } else {
      return null;
    }
  }
}